<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增创建项目')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-building-add">

            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">建筑名称：</label>
                <div class="col-sm-8">
                    <input name="pName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="pTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">建筑地址：</label>
                <div class="col-sm-8">
                    <input name="pAddress" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">建筑面积：</label>
                <div class="col-sm-8">
                    <input name="pArea" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">建筑层数：</label>
                <div class="col-sm-8">
                    <input name="pLayer" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">建筑高度：</label>
                <div class="col-sm-8">
                    <input name="pHighly" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">建筑施工范围：</label>
                <div class="col-sm-8">
                    <input name="pScope" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">水泵房容量：</label>
                <div class="col-sm-8">
                    <input name="pWaterpumpCapacity" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">水泵房位置：</label>
                <div class="col-sm-8">
                    <input name="pWaterpumpLocation" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">消防控制室位置：</label>
                <div class="col-sm-8">
                    <input name="pFireLocation" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">消防控制室面积：</label>
                <div class="col-sm-8">
                    <input name="pFireArea" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">使用点位联系人：</label>
                <div class="col-sm-8">
                    <input name="pUnitContact" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">联系电话：</label>
                <div class="col-sm-8">
                    <input name="pTelephone" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label is-required">项目状态：</label>
                <div class="col-sm-8">
<!--                    <input name="pState" class="form-control" type="text" required>-->
                    <select id="pState" name="pState" th:with="type=${@dict.getType('z_project_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/building"
        $("#form-building-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-building-add').serialize());
            }
        }

        $("input[name='pTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>